package yxm.zyf.love.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import yxm.zyf.love.utils.RedisUtils;

@Controller
public class RedisTestController {

//    @Resource(name = "batchRedisTemplate")
//    private RedisTemplate<String, Object> batchRedisTemplate;
    
    @Autowired
    private RedisUtils redisUtils;
      
    @RequestMapping("/redis/testbath")
    @ResponseBody
    public Object demo() {
//        batchRedisTemplate.opsForValue().set("testbath","zy");
        return "ok";
    }
    
    @RequestMapping("/redis/testpub")
    @ResponseBody
    public Object testpub() {
        redisUtils.set("testpub","yancun");
        return "ok";
    }
}
